var editor;
function initEditor(){
	   var sessionId=getCookie("JSESSIONID");
       KindEditor.plugin('carousel', function(K) {  
	       var editor = this, name = 'carousel';  
	       // 点击图标时执行  
	       editor.clickToolbar(name, function() {  
	         $("#carouselModal").modal("show");
	       });  
	    });  
    

  	KindEditor.ready(function(K) {
 		 editor= K.create('#contenteditor', {
 			formatUploadUrl:false,
 			filterMode : false,
			items:["source","|","undo","redo","|","preview","print","template","code","cut","copy","paste","plainpaste","wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","clearhtml","quickformat","selectall","|","fullscreen","/","formatblock","fontname","fontsize","|","forecolor","hilitecolor","bold","italic","underline","strikethrough","lineheight","removeformat","|","image","multiimage","flash","media","insertfile","table","hr","emoticons","baidumap","pagebreak","anchor","link","unlink","|","carousel"],
			uploadJson:'cms/file/uploadForCurrentUser.htm?dir;jsessionid='+sessionId, 
			fileManagerJson:'cms/file/listForKindEditorAndCurrentUser.htm;jsessionid='+sessionId,
			allowFileManager : true
		 });
 		  
 	});
}